<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/common/tag.jsp"%>
<html>
	<head>
		<link rel="stylesheet" href="${ctx}/css/flexigrid/flexigrid.css"
			type="text/css"></link>
		<link href="${ctx }/ui/frame/main.css" rel="stylesheet"
			type="text/css" />
		<link href="${ctx }/js/validationEngine/validationEngine.jquery.css"
			rel="stylesheet" type="text/css" />
		<script type="text/javascript"
			src="/js/validationEngine/jquery.validationEngine-cn.js">
</script>
		<script type="text/javascript"
			src="/js/validationEngine/jquery.validationEngine.js">
</script>

		<script type="text/javascript">
$(function() {
	$("#userForm").validationEngine({ 
				  ajaxSubmit: true, //是否ajax提交
				  ajaxSubmitFile: "${ctx}/login/login.do?method=save",//ajax提交的url
				  beforeSubmit:function(){
					  alert(3);
				  },
				  afterSubmit:function(){
					 alert("${successful}");	
			      }	  		  
			})
})
</script>
	</head>
	<body>
		<form id="userForm" name="userForm" method="post" action="">
			<table class="tableForm">
				<tr>
					<th>
						用户姓名：
					</th>
					<td>
						<input name="username" type="text" id="username"
							value="${user.username}" />
						<font color='red'>&nbsp;*</font>
					</td>
					<th>
						用户密码：
					</th>
					<td>
						<input name="password" type="text" id="password"
							value="${user.password}" />
						<font color='red'>&nbsp;*</font>
					</td>
				</tr>
				<tr>
					<th>
						手机号码：
					</th>
					<td>
						<input name="modelphone" type="text" id="modelphone"
							value="${user.modelphone}" />
						<font color='red'>&nbsp;*</font>
					</td>
					<th>
						性别：
					</th>
					<td>
						<input name="sex" type="radio" value="男"
							<c:if test="${user.sex=='男'}">checked="checked"</c:if> />
						男 &nbsp;&nbsp;&nbsp;&nbsp;
						<input name="sex" type="radio" value="女"
							<c:if test="${user.sex=='女'}">checked="checked"</c:if> />
						女
					</td>
				</tr>
				<tr>
					<th>
						邮箱
					</th>
					<td>
						<input name="email" type="text" id="email"
							value="${user.email}">
					</td>
					<th>
						年龄
					</th>
					<td>
						<input name="age" type="text" id="age"
							value="${user.age}">
					</td>
				</tr>
				<input type="hidden" id="id" name="id" value="${user.id}">
			</table>
			<div class="butcenter">
				<input type="submit" value="保 存" class="btnSmall" />
				&nbsp;&nbsp;&nbsp;
				<input type="reset" value="重 置" class="btnSmall" />
			</div>
		</form>
	</body>
</html>